﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BoCaiWeb.WebSite.Code;
using BoCaiWeb.Model;
using BoCaiWeb.Business;
using Ajeelee.Core.Utils;
using System.Collections;

namespace BoCaiWeb.WebSite.WebAdmin
{
    public partial class PhotoEdit : AuthPageBase
    {
        protected int id;
        Hashtable table = new Hashtable();
        protected IList<PhotoImgs> photoImgs = new List<PhotoImgs>();
        IPhotoImgsBusiness photoBll = new PhotoImgsBusinessFactory().CreatePhotoImgsBusiness();

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            try
            {
                id = QueryParamInt32("id");
                if (id > 0)
                {
                    table.Add(PhotoImgsHash.CId, id);
                    table.Add(PhotoImgsHash.OrderField, "Sort");
                    table.Add(PhotoImgsHash.OrderDirection, "asc");
                    photoImgs = photoBll.GetAllPhotoImgs(table);
                }
                else
                {
                    MessageBoxGo("图集ID不存在", "PhotoList.aspx");
                }
            }
            catch (Exception ex)
            {
                Function.WriteErrorLog(ex);
            }
        }
    }
}